package com.cgbl.cg.adapter

import android.graphics.Bitmap
import android.util.Log
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.DataSource
import com.bumptech.glide.load.engine.GlideException
import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.target.Target
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cgbl.cg.R
import com.robot.base.model.WorksBean
import com.robot.base.utils.pic.ImageLoaderUtils

class WorksCollectionAdapter :
    BaseQuickAdapter<WorksBean, BaseViewHolder>(R.layout.app_item_works_collection) {

    private var isEditModel = hashMapOf<Int, Boolean>()

    override fun convert(holder: BaseViewHolder, item: WorksBean) {
        ImageLoaderUtils.displayRound(
            context, holder.getView(R.id.iv_project_img), item.coverImages, 8
        )
        ImageLoaderUtils.displayCircle(context, holder.getView(R.id.iv_user_avatar), item.head)
        holder.setText(R.id.tv_project_name, item.workName)
        holder.setText(R.id.tv_username, item.nickName)
        holder.setText(R.id.tv_num, item.viewCount)

    }
}